<div class="g-bd clearfix">
        <?php echo $this->render('index/left.phtml');?>
        <!-- 主栏 -->
        <div class="g-mn">
        
        	<?php if($this->itemDetailArray): ?>
        	<div class="w-blk0 w-blk-pdishow" style="margin-bottom:10px;">
                <h2 class="blk0h2 f-iblk clearfix">
                	<span class="spbg blkhdl"><?php if(isset($this->parentArray)):?><span itemprop="category"><?php echo $this->parentArray[count($this->parentArray)-2];?></span> &gt; <?php endif; ?><span itemprop="name">[<?php echo $this->keyword;?>] <?=$this->itemDetailArray[0]['subject']?></span></span>
                    <span class="spbg blkhdr">&nbsp;</span>
                </h2>
                <div class="blkbody">
                	<div class="pdinfo clearfix">
                        <div class="psimg">
                            <div class="pbimg">
                                <a href="<?php echo $this->url($this->itemDetailArray[0]['itemid']);?>"><span itemprop="image"><img style="width: 258px;" src="<?=MY_URL?>/<?=$this->itemDetailArray[0]['medium_url']?>" onerror="javascript:this.src ='<?=MY_URL?>/html/images/nothingpic.jpg'"/></span></a>
                            	<span class="discount-prd f-iblk"><?php echo intval(($this->itemDetailArray[0]['m_org_price']-$this->itemDetailArray[0]['max_price'])/$this->itemDetailArray[0]['m_org_price']*100) ?>%</span>
                            	<?if(($this->itemDetailArray[0]['proPrintnumber']) || !empty($this->select_badgepatch)):?>
                            	<span class="customize-prd f-iblk" style="top:-13px;left:172px;"></span>
                            	<?php endif;?>
                            </div>
                        </div> 
                        <div class="pdmore" style="float:none;width:auto;">
	                    	<h1 class="pdtitle"><span itemprop="name">[<strong><?php echo $this->keyword;?></strong>] <?=$this->itemDetailArray[0]['subject']?></span></h1>
	                        <div class="pdprice pitem clearfix" style="height:32px;">
	                        	<div><span style="line-height:29px;">SALE!</span><span itemprop="price" class="jersey-price" style="line-height:29px;margin: 0 10px;">$<?php echo $this->itemDetailArray[0]['max_price']?></span></div>
	                        </div>
	                        
	                        <?php if ($this->itemDetailArray[0]['is_showed'] != 0):?>
	                        <div class="paddcart pitem">
	                        	<a href="<?php echo $this->url($this->itemDetailArray[0]['itemid']);?>"><input type="submit" class="spbg" value="BUY THIS SHIRT NOW"/></a>
	                            <div class="cartinfo" style="display: none;">In Stock and Ready to Ship! Sold by bestcheapjerseydeal Retail, Inc.&nbsp;&nbsp;&nbsp;<a href="#">Shipping Options</a></div>
	                        </div>
	                        <?php else: ?>
	                        <div class="paddcart pitem">
	                        	Sorry, this shirt has been sold out.
	                        </div>
	                        <?php endif;?>
	                        
				            <?php 
				            	$desc = '';
				            	if(count($this->itemArray) > 0){
				            		$i=0;
				            		foreach($this->itemArray as $value){
				            			if($i > 5){
				            				break;
				            			}
				            			$i++;
				            			if(isset($value['subject'])){
				            				$desc.=$value['subject'].':'.$value['description']."<br />";
				            			}else{
				            				$desc.=$value[0]['name'].':'.$value[0]['description']."<br />";
				            			}
				            		}
				            	}
				            	$keyArray = preg_split('/[^a-zA-Z0-9]+/',$this->keyword);
				            	$newKeyArray = array();
				            	foreach($keyArray as $key => $value){
				            		$newKeyArray[$key] = '<strong>'.$value.'</strong>';
				            	}
				            	$desc = str_ireplace($keyArray,$newKeyArray,$desc);
				            ?>
				            
	                        <p class="description showmore">
								<span itemprop="description"><?php echo $desc; ?></span>
	                        </p>
	                        <div><a id="showPdDesc" href="#">more</a></div>                                
	                    </div>
                    </div>
                    
                    <div class="spbg2 pd-adver">
                        <strong>WOW!</strong>
		            	<span>
		            		<span>Free Shipping</span>
		            		<span class="spbg2">Free Returns</span>
		            		<span class="spbg2">Free 365 Day Return Policy</span>
		            		<span class="spbg2">24/7 Customer Service</span>
		            	</span>
                    </div>
                </div>
            </div>
            <?php endif; ?>
        
        
    <div class="w-blk0 w-blk-pdlshow">
                <h2 class="blk0h2 f-iblk clearfix">
                	<span class="spbg blkhdl"><a href="<?php echo MY_URL?>">Home</a> &gt; <?php echo $this->keyword;?></span>
                    <span class="spbg blkhdr">
                    	&nbsp;
                    </span>                    
                </h2>
                <div class="blkbody">
                <?php if(count($this->itemArray)):?>
                <ul class="clearfix">
                	<?php $index=0;?>
	                <?php foreach($this->itemArray as $value):?>
	                  <?php if (isset($value['subject'])):?>
	                  <li class="clearfix">                    	
	                     <div class="prd simg"><a href="<?php echo $this->url($value['itemid']);?>" title="<?php echo $value['subject'];?>"><img alt="<?php echo $value['pattern_intro'];?>" title="<?php echo $value['pattern_intro'];?>" src="<?php echo MY_URL;?>/<?php echo $value['cut_url'];?>" onerror="javascript:this.src ='<?=MY_URL?>/html/images/nothingpic.jpg'" /></a></div>
	                     <div class="prdl">
                         	<h2 class="spname"><a href="<?php echo $this->url($value['itemid']);?>" title="<?php echo $value['subject'];?>"><?php echo $value['subject'];?></a></h2>
                            <div class="description"><?php echo $value['description'];?></div>
	                     	<div class="sprice clearfix"><a class="spbg f-iblk priceA" href="<?php echo $this->url($value['itemid']);?>" title="<?php echo $value['subject'];?>">Price <span class="delete">$<?php echo $value['m_org_price'];?></span> <strong>$<?php echo $value['max_price'];?></strong></a><a class="buynowA spbg f-iblk" href="<?php echo $this->url($value['itemid']);?>">BUY&nbsp;&nbsp;NOW</a></div>
                         </div>
                         <?php if($index<2):?>
                         <a href="<?php echo $this->url($value['itemid']);?>" class="hot-prd f-iblk">&nbsp;</a>
                         <?php else: ?>
                         <a href="<?php echo $this->url($value['itemid']);?>" class="discount-prd f-iblk"><?php echo intval(($value['m_org_price']-$value['max_price'])/$value['m_org_price']*100) ?>%</a>
                         <?php endif; ?>
                         <?if($value['proPrintnumber']):?>
                     		<a style="top:-6px;left:100px;" href="<?php echo $this->url($value['itemid']);?>" class="customize-prd f-iblk"></a>
                     	<?php endif;?>
                      </li>
                      <?php $index++;?>
                      <?php else:?>
                       <li class="clearfix">                    	
	                     <div class="prd simg"><a href="/football_shirt_<?php echo $value[0]['id'];?>.html" title="<?php echo $value[0]['name'];?>"><img alt="<?php echo $value[0]['name'];?>" title="<?php echo $value[0]['name'];?>" src="<?php echo MY_URL;?>/<?php echo $value[0]['cutUrl'];?>" onerror="javascript:this.src ='<?=MY_URL?>/html/images/nothingpic.jpg'" /></a></div>
	                     <div class="prdl">
                         	<h2 class="spname"><a href="/football_shirt_<?php echo $value[0]['id'];?>.html" title="<?php echo $value[0]['name'];?>"><?php echo $value[0]['name'];?></a></h2>
                            <div class="description"><?php echo $value[0]['description'];?></div>
	                     	<div class="sprice clearfix"><a class="spbg f-iblk priceA" href="/football_shirt_<?php echo $value[0]['id'];?>.html" title="<?php echo $value[0]['name'];?>">Price <span class="delete"><?php echo $value[0]['price'];?></span></a><a class="buynowA spbg f-iblk" href="/football_shirt_<?php echo $value[0]['id'];?>.html" title="<?php echo $value[0]['name'];?>">BUY&nbsp;&nbsp;NOW</a></div>
	                 	 </div>
                      </li>
                      <?php endif;?>
	                <?php endforeach;?>           
                </ul>            
	                <?php else:?>
	                	<div style="text-align: center;font-weight: bold;color: red;padding: 20px 0;display: block;">No Results Match Your Search .</div>
	                <?php endif;?>                
                </div>   
                <div class="pages clearfix" style="margin-top: 10px;">
					<div class="g-pages-style">
						<?php //echo $this->pageString?>
					</div>
				</div>       
            </div>
            <div style="margin:10px;"><div class="fb-comments" data-href="http://www.bestcheapjerseydeal.com" data-width="700" data-num-posts="50"></div></div>
        </div>
    </div>
